package main

import "fmt"

func main() {
	fbc(100)
	for _, v := range age3 {
		for _, x := range v {
			fmt.Println(x)
		}
	}
}

// 斐波那契数组
func fbc(n int) {
	a := make([]int, n)

	a[0] = 1
	a[1] = 1
	for i := 2; i < len(a); i++ {
		a[i] = a[i-1] + a[i-2]
	}
	for _, v := range a {
		fmt.Println(v)
	}

}

//数组声明方式

var age0 [5]int = [5]int{1, 2, 3}
var age1 = [5]int{1, 2, 3, 4, 5}
var age2 = [...]int{1, 2, 3, 4, 5}
var age3 = [...][3]string{{0: "132", 2: "123"}, {"aaa", "bbb", "ccc"}}
